# -*- coding: utf-8 -*-
"""
@Author: 苏苏少年
@File: 002.py
@Time: 2022/4/3 9:14
"""

"""
    第二题:
        AI模拟石头剪刀布!
"""

import random

# 玩家信息
player_name = input('请输入玩家的姓名: ')

print(player_name, 'VS', 'AI选手')

player_first = eval(input('------------   请' + player_name + '出拳: 1.石头 2.剪刀 3. 布 -----\n'))
if(player_first == 1):
    player_first_name = '石头'
elif (player_first == 2):
    player_first_name = '剪刀'
elif (player_first == 3):
    player_first_name = '布'
else:
    player_first_name = '布'
    player_first = 1

# 电脑角色出拳
computer_first = random.randint(1, 3)  # 包括三!
if (computer_first == 1):
    computer_first_name = '石头'
elif (computer_first == 2):
    computer_first_name = '剪刀'
else:
    computer_first_name = '布'

print(player_name, '出拳:', player_first_name)
print('AI', '出拳:', computer_first_name)

if (player_first == computer_first):
    print('  (平局啦!)).oO ')
elif (player_first == 1 and computer_first == 2) or (player_first == 2 and computer_first == 3) or (player_first == 3 and computer_first == 1):
    print('  玩家', player_name, '胜!💔')
else:
    print('  AI ', '胜💘')


